﻿
using System.Collections.Generic;
using System.Linq;
using NFLManager.Data;
using NFLManager.Properties;
using NFLManagerViewer;

namespace NFLManager
{
    public class Controller
    {
        private List<Team> teams = new List<Team>();

        public void updateTeamsStats()
        {
            
            Program.mainForm.setProgressBarParameters(0,Settings.TEAMS.Count(),1);
            Settings.TEAMS.ToList().ForEach(x =>
            {
                //teams.Add(new Team(x, DataManager.GetTables(x)));
                Program.mainForm.incrementProgressBar();
            });
            Program.mainForm.hideProgressBar();
        }

        //public void createXLS()
        //{
        //    Program.mainForm.setProgressBarParameters(0, Settings.TEAMS.Count(), 1);
        //    foreach (var team in teams)
        //    {
        //        ExcelManager.writeReportXLS(team);
        //        ExcelManager.finalModifySaveAndClose(Settings.Default.DATA_PATH + team.Id);
        //        Program.mainForm.incrementProgressBar();
        //    } 
        //    Program.mainForm.hideProgressBar();
        //}
    }
}
